package com.zb.serviceimpl;

import java.util.List;

import com.zb.dao.WxDao;
import com.zb.daoimpl.WxDaoImpl;
import com.zb.entity.Wx;
import com.zb.entity.Yh;
import com.zb.service.WxService;
import com.zb.util.PageUtil;

public class WxServiceImpl implements WxService{
	private WxDao wxDao=new WxDaoImpl();
	public PageUtil<Wx> getPersonPage(Integer index, String carnum) {
		PageUtil<Wx> page = new PageUtil<Wx>();
		
		List<Wx> list = wxDao.getListWx(index, page.getSize(),
				carnum);
		int count = wxDao.getCountWx(carnum);

		page.setCount(count);
		page.setData(list);
		page.setIndex(index);
		return page;
	}

	public void addWx(Wx w) {
		// TODO Auto-generated method stub
		wxDao.addWx(w);
	}

	public void update(Wx w) {
		// TODO Auto-generated method stub
		wxDao.update(w);
	}

	public void delWx(int id) {
		// TODO Auto-generated method stub
		wxDao.delWx(id);
	}

	public Wx getYhById(int id) {
		// TODO Auto-generated method stub
		return wxDao.getWxgetById(id);
	}

}
